package com.study.yygh.order.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author tao
 * @create 2021-09-27 16:39
 * @Description
 */
@FeignClient("service-cmn")
@Service
public interface DictFeignClient {

    // 做远程调用的时候 一定要给@PathVariable注解加上()指定值

    // 根据dictCode和value查询
    @GetMapping("/admin/cmn/dict/getName/{dictCode}/{value}")
    public String getName(@PathVariable("dictCode") String dictCode,@PathVariable("value") String value);

    // 根据value查询
    @GetMapping("/admin/cmn/dict/getName/{value}")
    public String getName(@PathVariable("value") String value);
}
